package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.News;
import cn.wolfcode.trip.base.domain.NewsContent;
import cn.wolfcode.trip.base.domain.StrategyDetail;
import cn.wolfcode.trip.base.query.NewsQueryObject;
import cn.wolfcode.trip.base.query.QueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface INewsService {

    int deleteByPrimaryKey(Long id);


    News selectByPrimaryKey(Long id);

    List<News> selectAll();

    PageInfo<News> query(NewsQueryObject qo);

    NewsContent getNewsContentById(Long id);

    void saveOrUpdate(News news);

    void updateBroseNumById(Long id,Integer browseNum);

    void updateLikeNumById(Long id, Integer likeNum);

    News selectNewsByUserId(Long userId,Long newsId);

    void insertUserAndCollectionRelation(Long newsId, Long userId);

    void updateCollectionNumById(Long id, Integer collectionNum);

    void deleteCollectionAndUserRelation(Long newsId, Long userId);
}
